import axios from '@/request/request'
import qs from 'qs'
//精品推荐
export const JingpinAPI=()=>axios.get('/products/recommend')

//热门兑换
export const RemenAPI=()=>axios.get('/products/hot')
//发送短信验证码
export const SendSMSAPI=(params)=>axios.post("/sendSMS",qs.stringify(params))
//登录请求
export const PhoneReginAPI=(params)=>axios.post("/phoneRegin",qs.stringify(params))
//微信扫码登录
export const WeiXinLoginApI = (params) => axios.post(`/wechatUsers/PCLogin`, qs.stringify(params));
//手机号关联微信登录
export const BinddingAPI = (params) => axios.post("/wechatUsers/binding", qs.stringify(params));

//获取用户信息 
export const UserProfilesAPI = () => axios.get("/shop/userProfiles");
//请求产品详情信息
export const GoodsDetailsAPI = (params) => axios.get(`/products/${params}`);
//加入购物车
export const AddToCartAPI = (params) => axios.post("/shop/carts/add", qs.stringify(params));

//获取所有产品 [请求体] axios.get(url,{params:''}) 
//params = {did:1,type:xx,min:0...}
export const GoodsSearchAPI = (params) => axios.get("/products", { params });   //params:params